package com.arithmeticEveryDay.other;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/*

6a-5+1=2-2a

a=0.750

x+1=-3

x=-4.000

 */

public class SolveLinearEquation {
    
    static InOut0 io = new InOut0();
    String formula;
    double factors;
    double constants;
    double result;
    char variable;
    
    public SolveLinearEquation() {
        formula = io.next();
        getParameter();
        double temp = -1 * constants / factors;
        result = temp == -0 ? 0 : temp;
    }
    
    private void getParameter() {
        int i = 0;
        boolean afterEqual = false;
        while (i < formula.length()) {
            char ch = formula.charAt(i);
            // io.out.println(i + ", " + ch);
            if (ch == '=') {
                afterEqual = true;
                i++;
                continue;
            }
            int sign = 0;
            if (afterEqual) {
                sign = -1;
            } else {
                sign = 1;
            }
            if (ch == '+') {
                if (afterEqual) {
                    sign = -1;
                } else {
                    sign = 1;
                }
                i++;
            }
            if (ch == '-') {
                if (afterEqual) {
                    sign = 1;
                } else {
                    sign = -1;
                }
                i++;
            }
            int value = 0;
            boolean flag = true;
            ch = formula.charAt(i);
            while (ch >= '0' && ch <= '9' && i < formula.length()) {
                flag = false;
                ch = formula.charAt(i);
                // io.out.println(ch);
                value = value * 10 + ch - '0';
                i++;
                if (i < formula.length()) {
                    ch = formula.charAt(i);
                }
                
            }
            if (flag) {
                value = 1;
            }
            if (ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z') {
                variable = ch;
                i++;
                factors += sign * value;
                // io.out.println(factors + ", " + constants);
                continue;
            }
            constants += sign * value;
            // io.out.println(factors + ", " + constants);
        }
        
    }

    public static void main(String[] args) {
        SolveLinearEquation m = new SolveLinearEquation();
        String fResult = String.format("%.3f", m.result);
        io.out.printf(m.variable + "=" + fResult);
        io.out.flush();
    }

}
class InOut0 {
    BufferedReader br;
    StringTokenizer tok;
    PrintWriter out;
    public InOut0() {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new OutputStreamWriter(System.out));
    }
    public boolean hasNext() {
        while (tok == null || !tok.hasMoreElements()) {
            try {
                tok = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                return false;
            }
        }
        return true;
    }
    public String next() {
        if (hasNext()) {
            return tok.nextToken();
        }
        return null;
    }
    public int nextInt() {
        return Integer.parseInt(next());
    }
}